package com.lkm.app_ui.m.Imple.initapp;

import com.lkm.app_ui.AppConst;
import com.lkm.app_ui.event.InitAppOkEvent;
import com.lkm.comlib.task2.DefaultTaskExecutor;
import com.lkm.frame.app.InitAppTask;
import com.lkm.frame.otto.LinkBus;




public class MInitAppTask extends InitAppTask {
    public MInitAppTask() {
        super(new DefaultTaskExecutor(AppConst.getTaskExecutor(), true), MInitAppTask.class.getName(), AppConst.getTaskManager2(), AppConst.getModuleManager(), new InitPreTask(), new InitApp_RegModule());

    }

    @Override
    protected boolean onAllNeedLaunchModuleOK() {
        return super.onAllNeedLaunchModuleOK();
    }

    @Override
    public void onFinish(BootTaskResultWarp<Void> voidBootTaskResultWarp) {
        super.onFinish(voidBootTaskResultWarp);
        if (voidBootTaskResultWarp.isSuccess)
            onInitAppTaskEnd();
    }


    
    private void onInitAppTaskEnd() {
//        com.lkm.app_ui.m.Imple.initapp.InitAppTask.isInitOK = true;
        LinkBus.sendBroadcast(new InitAppOkEvent());

    }


}


